#include "types.h"
#include "x86.h"
#include "defs.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"

int
sys_fork(void)
{
  return fork();
}

int
sys_getpid(void)
{
  return proc->pid;
}

int
sys_print(void)
{
	char *str;
	int pid;
	if(argstr(0, &str) < 0)
		return -1;
	if(argint(1, &pid) < 0)
			return -1;

	cprintf(str, pid, cpu->id);
	return 0;
}

